05. Developer Workflow
heading
Developer Workflow
Summary
Exercises and projects can be completed in Jupyter notebooks. You can either work on a virtual machine inside a Udacity Workspace or use your local machine.
Udacity Workspaces
Workspaces will open up in your browser as you navigate through the course. They will already be running with the required dependencies and will have access to the datasets and files you will need to accomplish your tasks. For most users, it will be easiest to operate inside a Udacity Workspace.
Local Workflow
Working locally allows you more flexibility and permanence. You can save your exercises and projects for further reference, and you can install and use libraries to add to them to advance your learning. Additionally, some plotting tools will not work inside a virtual environment as they pop open a new GUI window. As you encounter exercises and projects in this course, you can download the relevant starter notebooks and datasets from a git repository that will be linked for each exercise.
To simplify python dependencies and avoid confusion caused by mismatched library versions, you can use this Pipfile.
I use pipenv to isolate my python dependencies from the rest of the system. Detailed instructions follow:
- Install Python 3, pip, and pipenv
mkdir $HOME/ds_for_wearables
- Download the above Pipfile to
$HOME/ds_for_wearables
cd $HOME/ds_for_wearables
pipenv install
This will install all the required dependencies to complete the exercises and projects.
To start a Jupyter notebook in this environment:
cd $HOME/ds_for_wearables
pipenv run jupyter notebook
offline, spyder IDE
Spyder IDE
My favorite editor is Spyder IDE, which mimics a MATLAB environment where you have both an editor and an IPython console side by side. You can run sections of code in your editor using similar syntax to MATLAB and view plots, code, and the console side by side. It also has features to examine variables and maintain a history of commands.
Note: On newer versions of macOS (macosx 10.14.6), I’ve encountered a bug where plotting causes the IPython kernel to significantly slow down. See bug thread. If you encounter this, the workaround is to disable AppNap using appnope.
import appnope
appnope.nope()